#include <func.h>
void sigfunc(int signum,siginfo_t *p,void *pp)
{
    printf("%d is coming,uid=%d pid=%d sending this signal\n",signum,p->si_uid,p->si_pid);
}
int main(int argc,char *argv[])
{
    pid_t pid=getpid();
    printf("My pid %d\n",pid);
    struct sigaction act;
    bzero(&act,sizeof(act));
    act.sa_sigaction=sigfunc;
    act.sa_flags=SA_SIGINFO;
    int ret=sigaction(SIGINT,&act,NULL);
    ERROR_CHECK(ret,-1,"sigaction");
    while(1);
    return 0;
}

